package com.px.service;

import com.px.dto.CommentDto;
import com.px.mapper.CommentDao;
import com.px.pojo.ShComment;
import com.px.vo.CommentReq;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CommentServiceProviderImpl implements CommentServiceProvider {



    @Resource
    private CommentDao commentDao;


    @Override
    public boolean insertComment(ShComment comment) throws Exception {
        int insert = commentDao.insertComment(comment);
        if (insert>0){
            return true;
        }
        return false;
    }

    @Override
    public List<CommentDto> getCartoonComments(CommentReq commentReq) throws Exception {
        return commentDao.getCartoonComments(commentReq);
    }
}
